﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text;
using ProcessControl;
using System.Data;
using MyLib;

namespace MarketContract
{
    public partial class Approval1 : System.Web.UI.Page
    {
       
        protected void Page_Load(object sender, EventArgs e)
        {

            ((ButtonList_TY)ButtonList1).BeforeSubmit += new System.ComponentModel.CancelEventHandler(NewRequest_BeforeSubmit);
        }

        void NewRequest_BeforeSubmit(object sender, System.ComponentModel.CancelEventArgs e)
        {
            string incidentid = Request.QueryString["Incident"].ToString();
            fld_TCONTRACTNO.Text = fld_TCONTRACTNO.Text + txtendNo.Text.Trim();
            DataAccess.Instance("BizDB").ExecuteNonQuery("update PROC_MARKETCONTRACT  set TCONTRACTNO='" + fld_TCONTRACTNO.Text.Trim() + "' WHERE  INCIDENT='" + incidentid + "' ");
            
        }
        
        
    }
}